package com.bdqn.business.quality.controller;

import com.bdqn.aop.Log;
import com.bdqn.business.quality.service.StudentManagerService;
import com.bdqn.entity.quality.UserStudent;
import com.bdqn.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/studentManager")
public class StudentManagerController {

    @Autowired
    private StudentManagerService studentManagerService;

    @Log("获得学生列表")
    @RequestMapping(value = "/getStudentList",method = RequestMethod.POST)
    public Result getStudentList(@RequestBody Map<String,Object> map){
        return studentManagerService.getStudentList();
    }

    @Log("保存学生")
    @RequestMapping(value = "/saveStudent",method = RequestMethod.POST)
    public Result saveStudent(@RequestBody UserStudent userStudent){
        return studentManagerService.saveStudent(userStudent);
    }
}
